<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="head">
        <script src="https://maps.google.com/maps/api/js?key=AIzaSyCvCDkYieuUBmMWon_mfLAfjuaeuosuqow&amp;sensor=false"></script>
    </ui:define>

    <ui:define name="title">
        GMap <span class="subitem">Map in Dialog</span>
    </ui:define>

    <ui:define name="description">
        This sample demonstrates using map inside a dialog.
    </ui:define>

    <ui:param name="documentationLink" value="/components/gmap"/>
    <ui:param name="widgetLink" value="GMap-1"/>

    <ui:define name="implementation">

        <div class="card">
            <p:commandButton id="btn" type="button" icon="pi pi-globe" value="Show Map" onclick="PF('dlg').show();"/>
        </div>

        <p:dialog id="gmapDialog" widgetVar="dlg" width="625" height="400" modal="true">
            <p:gmap id="gmap" center="41.381542, 2.122893" zoom="15" type="HYBRID" style="width:100%;height:400px"/>
        </p:dialog>

    </ui:define>

</ui:composition>
